package com.village.friend.utils;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import java.util.ArrayList;
import java.util.List;

public class MathUtils {

    /**
     * 生成随机验证码
     *
     * @return
     */
    public static int getAuthCode() {
        int a = 1000;
        int b = 10000;
        return (int) (Math.random() * (b - a)) + a;
    }

    public static void main(String[] args) {
        List<String> photosP =new ArrayList<>();
        photosP.add("hdhhhdhdhd") ;
        photosP.add("hdhhhdhdhd") ;
        System.out.println(JSON.toJSONString(photosP));

        ArrayList arrayList = JSONObject.parseObject(JSON.toJSONString(photosP), ArrayList.class);


    }
}
